void merge(int* nums1, int nums1Size, int m, int* nums2, int nums2Size, int n) {
    int i = 0;
    int j = 0;
    int t = 0;
    int tmp[nums1Size];
    while (i < m && j < n) {
        if (nums1[i] <= nums2[j])
            tmp[t++] = nums1[i++];
        else
            tmp[t++] = nums2[j++];
    }
    while(i < m)
        tmp[t++] = nums1[i++];
    while(j < n)
        tmp[t++] = nums2[j++];
    i = 0;
    for(t = 0; t < m + n; ++t){
        nums1[i] = tmp[t];
    }
}


int main() {
	int num1[] = { 1,2,3,0,0,0 };
	int num2[] = { 2,5,6 };
	merge(&num1, 6, 3, &num2, 3, 3);
	
	return 0;
}
